<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>首页</title>
<!--样式设置-->
<link rel="stylesheet"
	href="${pageContext.request.contextPath }/static/plugins/bootstrap-3.3.7-dist/css/bootstrap.min.css">
<link rel="stylesheet"
	href="${pageContext.request.contextPath } /static/plugins/font-awesome-4.7.0/css/font-awesome.min.css">
</head>
<body>

	<nav class="navbar navbar-default">
		<div class="container-fluid">
			<!-- Brand and toggle get grouped for better mobile display -->

			<div class="navbar-header" style="width: 100%">

				<div style="float: left;">
					<a class="navbar-brand" href="#" style="margin-left: 20px">
						java技术论坛 </a>
				</div>

				<div style="float: right;">
				 <c:if test="${name!=null }">
				 <a class="navbar-brand" style="font-size: 15px">${name }</a>
				 <span class="navbar-brand">|</span>
				 <a class="navbar-brand" href="${pageContext.request.contextPath }/login">切换帐号</a>
				 </c:if>
					
				 <c:if test="${name==null }">
				 <a class="navbar-brand" href="${pageContext.request.contextPath }/login"
						style="font-size: 15px">登录</a> <span class="navbar-brand">|</span>
					<a class="navbar-brand" href="${pageContext.request.contextPath }/registe"
						style="font-size: 15px">注册</a>
				 
				 </c:if>
					
					
					<form class="navbar-form navbar-left" role="search">
						<div class="form-group">
							<input type="text" class="form-control" placeholder="Search">
						</div>
						<button type="submit" class="btn btn-default">收索</button>
					</form>
				</div>
			</div>
		</div>

		<div class="container">
			<div class="panel">
				<div class="panel panel-title">
					<ul class="nav navbar-nav">
					<li class="active"><a href="#">首页<span class="sr-only">(current)</span></a></li>
						
						<li><a href="#">精选话题</a></li>
						<li><a href="#">论坛帮助</a></li>
						<li><a href="${pageContext.request.contextPath }/post-bar">贴吧</a></li>
						
					</ul>
				</div>
			</div>
		</div>
	</nav>
	
	<div class="container">
		<div class="row">
			<div class="col-md-8" style="height:600px">
				<div id="carousel-example-generic" class="carousel slide"
					data-ride="carousel">
					<!-- Indicators -->
					<ol class="carousel-indicators">
						<li data-target="#carousel-example-generic" data-slide-to="0"
							class="active"></li>
						<li data-target="#carousel-example-generic" data-slide-to="1"></li>
						<li data-target="#carousel-example-generic" data-slide-to="2"></li>
					</ol>

					<!-- Wrapper for slides -->
					<div class="carousel-inner" role="listbox">
						<div class="item active">
							<img src="${pageContext.request.contextPath }/static/images/timg.jpg" alt="..."
								style="width: 750px; height: 500px;">
							<div class="carousel-caption">first</div>
						</div>
						<div class="item">
							<img src="${pageContext.request.contextPath }/static/images/timg (1).jpg" alt="..."
								style="width: 750px; height: 500px;">
							<div class="carousel-caption">second</div>
						</div>
						<div class="item">
							<img src="${pageContext.request.contextPath }/static/images/timg (2).jpg" alt="..."
								style="width: 750px; height: 500px;">
							<div class="carousel-caption">third</div>
						</div>
					</div>

					<!-- Controls -->
					<a class="left carousel-control" href="#carousel-example-generic"
						role="button" data-slide="prev"> <span
						class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
						<span class="sr-only">Previous</span>
					</a> <a class="right carousel-control" href="#carousel-example-generic"
						role="button" data-slide="next"> <span
						class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
						<span class="sr-only">Next</span>
					</a>
				</div>
			</div>
			
			<div class="col-md-4" style="height:600px">
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">最新发帖</h3>
					</div>
					<div class="panel-body">最热、最快</div>
					
					
					<ul class="list-group">
						<li class="list-group-item"><ahref"">【生活】</a><a href"">惊险的一刻！！！</a><span class="pull-right">【10/31】</span></li>
						<li class="list-group-item"><ahref"">【生活】</a><a href"">冬季养生！！！</a><span class="pull-right">【10/31】</span></li>
						<li class="list-group-item"><ahref"">【娱乐】</a><a href"">路人甲啊，裸奔！！！</a><span class="pull-right">【10/31】</span></li>
						<li class="list-group-item"><ahref"">【学习】</a><a href"">大数据时代！！！</a><span class="pull-right">【10/31】</span></li>
						<li class="list-group-item"><ahref"">【资讯】</a><a href"">怎样面试才能更有效！！！</a><span class="pull-right">【10/31】</span></li>
						<li class="list-group-item"><ahref"">【生活】</a><a href"">每日一主食！！！</a><span class="pull-right">【10/31】</span></li>
						<li class="list-group-item"><ahref"">【生活】</a><a href"">今天有人跌到沟里！！！</a><span class="pull-right">【10/31】</span></li>
						<li class="list-group-item"><ahref"">【生活】</a><a href"">今天有人跌到沟里！！！</a><span class="pull-right">【10/31】</span></li>
						<li class="list-group-item"><ahref"">【生活】</a><a href"">今天有人跌到沟里！！！</a><span class="pull-right">【10/31】</span></li>
						<li class="list-group-item"><ahref"">【生活】</a><a href"">今天有人跌到沟里！！！</a><span class="pull-right">【10/31】</span></li>
						
						
					</ul>
			
				</div>
			</div>
		</div>
	</div>
	
	<div class="container">
		<div class="panel panel-default">
			<div class="panel-heading">
				
				
				 <div class="panel panel-default">
				   <h3 class="panel-title">模块区</h3>
				</div>
				<div class="panel-body">
				
				<c:forEach items="${requestScope.subSections}" var="sub">
				<div class="col-md-4">
					<dl class="dl-horizontal">
						<dt>
							<img src="${pageContext.request.contextPath }/static/images/190.jpg" alt="..."
								style="width: 100px; heght: 100px; border-radius: 100px">
						</dt>
						<dd>
						<a href="${pageContext.request.contextPath }">${sub.title }</a><br>
						${sub.description}
						
						
						</dd>
					</dl>
				</div>
			</c:forEach>
			</div>		
			</div>
		
		</div>
	</div>

 


	<!-- 引入jQuery的js -->
	<script src=" ${pageContext.request.contextPath }/static/plugins/jquery-1.11.3.min.js"></script>
	<!-- 引入bootstrap的js -->
	<script
		src="${pageContext.request.contextPath }/static/plugins/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
</body>
</html>